package com.loukou.lkt.lkt.enums;

public enum OrderOperateLogTypeEnum {

	//操作类型 1: 新建保存， 2:编辑保存，3:部门审核通过，4:部门审核不通过，5：财务审核通过，6:财务审核不通过 ，7:取消订单8:状态更改'
	TYPE_NEW( 1, "新建保存" ),
	
	TYPE_EDIT( 2, "编辑保存" ),
	
	TYPE_DEPARTMENT_PASSED( 3, "部门审核通过" ),
	
	TYPE_DEPARTMENT_UNPASS( 4, "部门审核不通过" ),
	
	TYPE_FINANCE_PASSED( 5, "财务审核通过" ),
	
	TYPE_FINANCE_UNPASS( 6, "财务审核不通过" ),
	
	TYPE_CANCEL( 7, "取消订单" ),
	
	TYPE_STATE_CHANGE( 8, "状态更改");
	
	
	
	private int type;
	private String comment;
	
	OrderOperateLogTypeEnum( int type, String comment) {
		this.type = type;
		this.comment = comment;
	}
	
	public static OrderOperateLogTypeEnum parseType(int type) {
		for (OrderOperateLogTypeEnum e : OrderOperateLogTypeEnum.values()) {
			if (e.type == type) {
				return e;
			}
		}
		return TYPE_NEW;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}
	
}
